<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script>
function f() {
  let xhr = new XMLHttpRequest();
  xhr.open('get', 'http://localhost:8084/chat/getValue')
  xhr.setRequestHeader('Content-Type', 'application/json');
  xhr.send(JSON.stringify({
    'robotCode': 'hn2twk',
    'channelCode': 'A',
    'sessQaType': 'QA',
    'sendTime': new Date().getTime(),
  }));
  xhr.onload = function () {
    console.log("f-onload=======", xhr.responseText)
    let {code, result, msg} = JSON.parse(xhr.responseText)

  }
}

function f1() {
  let xhr = new XMLHttpRequest();
  xhr.open('post', 'http://localhost:8084/chat/setValue')
  xhr.setRequestHeader('Content-Type', 'application/json');
  xhr.send(JSON.stringify({
    'msg': new Date().getTime()
  }));
  xhr.onload = function () {
    console.log("f1-onload=======", xhr.responseText)
    let {code, result, msg} = JSON.parse(xhr.responseText)

  }
}

f()
setTimeout(f1, 3 * 1000)
</script>
